Age‐specific sensitivity analysis of stable, stochastic and transient growth for stage‐classified populations

Abstract Sensitivity analysis in ecology and evolution is a valuable guide to rank demographic parameters depending on their relevance to population growth. Here, we propose a method to make the sensitivity analysis of population growth for matrix models solely classified by stage more fine‐grained by considering the effect of age‐specific parameters. The method applies to stable population growth, the stochastic growth rate, and transient growth. The method yields expressions for the sensitivity of stable population growth to age‐specific survival and fecundity from which general properties are derived about the pattern of age‐specific selective forces molding senescence in stage‐classified populations.


| INTRODUC TI ON
Matrix models are a widely used tool for demographic analysis.
They require individuals in the population to be grouped into separate classes and the individual dynamics through the classes to be quantified (Caswell, 2001). A basic application of matrix models is demographic projection, which consists in updating population abundances starting from a given initial state. A salient feature of these models is their being amenable to the sensitivity analysis of virtually any function, for example, the population growth rate, to the demographic parameters they contain (Caswell, 2019).
Age is a classic descriptor for individual classification. It is at the basis of the Leslie matrix model (Keyfitz & Caswell, 2005), where individuals are classified into separate age classes and their agespecific survival and fecundity are quantified. Stage is another classic descriptor. A stage may be a size class (Calvo & Horvitz, 1990;Hoffmann, 1999;Pfeifer et al., 2006), a developmental phase (Kaneko & Takada, 2014), an occupied territory (Stephens et al., 2002), the position of the individual within a network (Giaimo et al., 2018), or any other individual state variable. More sophisticated demographic classifications are possible. For example, lately there has been a rise in the need of classifying individuals by both age and stage (Caswell, 2012;Caswell et al., 2018;Steiner et al., 2014) or through multiple descriptors of individual state (Roth & Caswell, 2016).
However, in matrix models purely based on stage, which are the focus of the present work, age is not absent. It merely is implicit (Cochran & Ellner, 1992). With each update of stage abundances, individuals either die or survive while getting one time unit older.
Leveraging this ineluctable demographic fact, methods have been proposed to extract from stage-classified matrix models a variety of age-related quantities. These include, for example, stage-specific life expectancy, average age at parenthood, or average age-specific fecundity (Caswell, 2001(Caswell, , ch. 5, 2009Cochran & Ellner, 1992;Horvitz & Tuljapurkar, 2008;Tuljapurkar & Horvitz, 2006). The reason that age-from-stage methods exist is that they are a natural response to the need of analyzing along the "age" dimension the numerous matrix models that have been already constructed exclusively on the basis of stage and not of age. Moreover, matrix models only based on stage are arguably more prevalent than matrix models based on both age and stage, as age × stage models require more data for their parameterization and these additional data may not always be available or easy to collect. The presence of environmental variability may further exacerbate this unbalance as multiple matrix models need to be parameterized for the same population when the environment fluctuates.
A form of age-from-stage method is the sensitivity analysis of population growth for stage-classified populations with respect to age-specific perturbations. In a more general work on age × stage matrix models, Caswell (2012) proposed a way to perform this analysis for the stable growth rate of matrix models of populations classified by stage and living under constant environmental conditions.
Caswell's method is based on the construction, from the stagebased matrix model, of another, larger matrix model that includes both age and stage classification to then perform age-specific sensitivity analysis of population growth using matrix calculus on the derived model. An application of this method is the quantification of selection gradients on age-specific mortality and fecundity from matrix models of populations classified solely by stage (Caswell, 2012;Caswell & Salguero-Gómez, 2013).
The general framework for the analysis of age × stage matrix models upon which Caswell's method for the analysis of stage-based models relies is very general and so is the matrix calculus upon which it is based (Caswell, 2019;Caswell et al., 2018). This framework covers way more than the sensitivity analysis of population growth. It is also possible to envisage that such framework could be extended to capture the sensitivity analysis of transient population growth and long-run population growth to age-specific parameters for stageclassified models under environmental stochasticity. Notably, an invitation to extend the framework for the analysis of age × stage matrix models to the case of changing environments is contained in Caswell et al. (2018, p. 581). This appears as a potentially important extension, as environmental fluctuations are a very common condition for most populations (Bernhardt et al., 2020). But, to the best of our knowledge, there has been so far no visible progress along the front of explicitly applying age-specific sensitivity analysis of the growth rate for stage-classified populations under environmental stochasticity.
In this work, we do note embark into the broad endeavor of extending the general analysis of age × stage matrix models. We do, however, go in the direction of expanding along the "age" dimension the scope of sensitivity analysis of population growth for matrix models solely classified by stage. In doing so, we hope to contribute to the mentioned need of analyzing the already available matrix models that happen to be based on stage only, and not on age.
Here, we propose a method that is alternative to, and larger in scope than, that proposed by Caswell (2012) for the sensitivity analysis of population growth in models only classified by stage with respect to age-specific perturbations. Our method is alternative to that of Caswell (2012) because we do not require the separate construction and analysis of an age × stage matrix model (although a formal equivalence between the two methods is shown in the Appendix A.2). Our method is larger in scope because it directly applies to stable population growth in a constant environment as well as to transient and long-run population growth under environmental stochasticity. We propose two applications of our method to evidence what we believe are some of its advantages. The first application is the analysis of age-specific selective forces molding senescence in stage-classified populations. We show how some properties of these forces, which were made observable in Caswell and Salguero-Gómez (2013), can now be predicted analytically via our method. The second application is the decomposition of the elasticities of transient and stochastic growth into age-specific components. This application shows how our method can yield a fine-grained version of the sensitivity analysis of population growth for stage-classified models.
Finally, we would like to stress that our method for age-specific sensitivity analysis only applies to matrix models structured solely by stage. The method has no say on matrix models that are structured by both age and stage.

| No age specificity
Here, we recall known results from age-independent sensitivity analysis of population growth. A column vector n(t) describes stage-specific abundances in the population at time t. The component i of this vector is the population abundance in stage i at time t. In one time unit, each individual in stage j contributes a i,j individuals to stage i . When the environment is constant, this contribution is constant too. The dynamics of n(t) are then determined by the projection matrix A = a i,j , which is assumed to be classified by stage, as At demographic stability, the total population size grows every time step by a factor corresponding to the dominant eigenvalue of A and the relative fraction in stage j remains constant and equal to the component w j of the right dominant eigenvector w of A. This eigenvector is assumed to be normalized so that its components add up to 1. The left dominant eigenvector v contains reproductive values, which capture the relative importance of individuals to future population growth depending on their stage.
Suppose A depends on some parameter with current value * . A classic result by Caswell (1978) is that the sensitivity of stable population growth on the log scale, ln , to this parameter is where the derivative should be understood as evaluated at = * .
An analogous result holds when the environment can be in different states that affect the demography. Assume transitions among environmental states obey an ergodic time-homogeneous Markov chain and to each environmental state there corresponds a projection matrix. The update of stage-specific abundances then takes the form where A(t) is the projection matrix for the environmental state at t.
As most authors, we assume that in the long run and independently of the initial stage distribution, population growth is characterized by the stochastic growth rate ln s (which is valid under the assumptions discussed by Cohen (1977aCohen ( , 1977b; Tuljapurkar (1990) where N(t) is population size at t. Tuljapurkar (1990) pioneered sensitivity analysis of the stochastic growth rate. He defined three main quantities: the time-specific stage distribution w(t), the time-specific reproductive value vector v(t), which are vectors scaled so that the components of each add up to 1 (for the computation of these quantities see Section A.3 of the Appendix), and the time-specific growth where e is a vector of 1s. The quantity t is the factor by which population size changes between t and t + 1. Suppose that the matrices for demographic projection depend on some parameter . Expanding upon the original analysis of Tuljapurkar (1990), Caswell (2005) showed that the sensitivity of long-run population growth to a parameter (with current value * ) upon which some demographic rates depend is which is a stochastic analog of Equation 2 and where the derivative should be understood as evaluated at = * . The chief approach to estimate ln s ∕ is via extensive stochastic simulations of the demographic process (Caswell, 2001;Morris & Doak, 2002).
Finally, time-specific growth (sometimes called the transient population growth rate) ln t is susceptible of sensitivity analysis too.
Combining and differentiating Equations 3 and 5, Caswell (2007, eq. 43) found that where the vectors n(t) ∕ are computed via the recursion from given initial vectors n(0) and n(0) ∕ . Caswell (2007) gives information on how to set the latter vector. A particularly relevant case is when has no effect on the initial population and n(0) ∕ is the zero vector. The derivatives in Equations 7 and 8 should be understood as evaluated at 's current value.

| Adding age specificity
Suppose we are given a stage-classified matrix model A. In performing sensitivity analysis of the stable population growth for this matrix, Equation 2 presupposes that, when changes, all individuals with demographic rates that depend on will be equally affected regardless of the age of these individuals. This is because the entries of A express stage-specific quantities. Although the given model is classified by stage, changes in the population are theoretically conceivable so that they only affects individuals of age j (Caswell, 2012, p. 408). And we may want to find out the (1) n(t + 1) = An(t). ( resulting effect on population growth. Supposing that no additional age-specific data are available or can be collected for the target population, to analyze the age-specific sensitivity of population growth one can only try to squeeze information out of the given stage-classified model. To get the relevant information for this purpose, Caswell (2012) proposed the construction of an age × stage matrix model from the entries of the stage-classified model. Age-specific sensitivity analysis can then be performed on the obtained age × stage model and not anymore on the original stage-classified model. Here, we propose an alternative way of addressing the problem of getting age-specific sensitivity of population growth from models that were constructed using a stage-based classification. We deem our proposal alternative because it does not pass through the construction of an age × stage matrix model. (However, we can prove an essential equivalence with Caswell's approach, see Section A.2 of the Appendix.) Our proposal in essence consists in only slightly modifying the results of the age-independent sensitivity analysis reviewed in the previous section to make them age-specific.
We start from the case of a constant environment. To emphasize that we now analyze a scenario characterized by age-specific effects, we write the parameter as j . Since A is assumed classified by stage, it is very hard to envisage how we could, if ever, introduce in it a perturbation parameter for age-specific effects.
The matrix A governs the demography of individuals depending on their stage and independently of their age. Modifying entries of A implies modifying demographics in an age-independent fashion. To solve this problem, we propose the following construction.
First, rewrite Equation 1 as where A k = A for k = 1, 2, …, while n k (t) contains stage-specific abundances of individuals aged k, that is, the i component of this vector is the number of individuals in stage i and of age k at t and Equation 9 separately projects each age class using the same demographic rates. Using the construction in Equation 9, we can specifically target the demographic rates of individuals aged j by supposing that the matrix A j depends on some parameter j with current value * j . We then rewrite Equation 9 as where all matrices are still identical with one another but we have singled out A j to highlight its dependence on a parameter upon which the other matrices do not depend.
Next, we note that Equation 2 makes the mechanism through which a change in affects stable population growth transparent.
The quantity a i,j is the demographic contribution of an individual in stage j to stage i per time step. The (i, j)-entry of the matrix A ∕ is the sensitivity of a i,j to . In Equation 2, this sensitivity is weighted to contribute toward ln ∕ . The weight is the product v i w j , which accounts both for the relative number w j of individuals whose demographic rates are directly dependent on , that is, the individuals in stage j, and for the relevance, given by the reproductive value v i , to population growth of a change that alters the demographic influx to stage i . Equation 10 and the logic behind Caswell's result suggest a straightforward way of getting an expression for the age-specific sensitivity of ln . We should modify Equation 2 in two ways: we should substitute the matrix A ∕ of sensitivities of age-independent demographic rates with the matrix A j ∕ j of age-specific sensitivities and we should substitute the stable stage distribution w with the fraction w j of the stable stage distribution aged j. The i component of w j is the stable population fraction in stage i and of age j. Thus where, as in the corresponding age-independent formula, the derivative is evaluated at j 's current value. In this way, the sensitivity of ln specifically accounts for the relative size of that part of the population that has demographic rates that depend on j . A formal derivation of Equation 11 is in Section A.1 of the Appendix. An essential equivalence with the ap-

| Age-specific stage distribution
To obtain w j (t) in Equation 12, we represent the projection matrix as a sum A(t) = U(t) + F(t), where U(t) = u i,j (t) is the transition matrix and is the fecundity matrix. The quantity u i,j (t) is the probability that an individual in stage j at t is in stage i at t + 1, while f i,j (t) is the number of new recruits in stage i at t + 1 per individual in stage j at t.
Age 1 is assigned to new recruits at their first census. Age is updated at demographic projection so that an individual of age j at t is of age j + 1 governs the survival and stage transitioning up to t and through age j ≥ 2 of those who were new recruits at t − j + 1. When they reach age j at t, the population has grown by a factor t−1 t … t−j+1 since their first census.
When t < j, we should consider individuals that were already present in the initial population and are still alive at t. However, we do not really require an initial age distribution within the stages to compute ln s ∕ j . Recall the weak ergodic theorem in demography: two populations experiencing the same sequence of projection matrices converge to the same time-varying stage distribution even if they have different initial stage distributions (Cohen, 1979).
A corollary of weak ergodicity is that the two populations also converge to the same age distribution even if their initial age distributions are different. In the long run, all initial individuals are dead and do not count directly anymore toward the age distribution. Moreover, the shared sequence of projection matrices and the convergence to a common stage distribution w(t) imply that both the production of new recruits F(t)w(t) and their subsequent survival, via U(t + 1)F(t)w(t), U(t + 2)U(t + 1)F(t)w(t), … , converge to the same levels in the two populations. The age distribution of a population is determined by the inflow of new individuals and their subsequent survival (Arthur, 1982). Hence, we expect the two populations to converge to the same time-varying age distribution.
Appendix B reports a numerical example of this convergence.
We can then estimate ln s ∕ j from long stochastic simulations starting from arbitrary age and stage distributions. Even more conveniently, we can outright discard a sufficient number of initial iterations of the simulated process so that any influence of the initial age distribution is negligible. Truncation of simulation results is already customary in the sensitivity analysis of ln s , for example, in Tuljapurkar et al. (2003), to minimize transient effects due to the initial stage distribution.
When the environment is constant and the population demographically stable, the recursion for w j in Equation 11 is as Cochran and Ellner (1992) showed, where w is the stable stage distribution. Hamilton (1966) kick-started age-specific sensitivity analysis of population growth. Equating ln with fitness, he proved that, in age-classified stable populations, selection against mortality always declines with adult age, and so does selection on fecundity under mild assumptions (e.g., the population is not shrinking, ≥ 1, and mortality is never zero).

| APPLI C ATI ON 1-AG E-S PECIFI C S ELEC TI ON , S TAG E S AND S ENE SCEN CE
His results are key to understand the evolution of senescence, an agerelated decline in biological functioning (Baudisch, 2005;Caswell & Shyu, 2017;Charlesworth, 1994;Giaimo & Traulsen, 2022b;Partridge & Barton, 1993). However, Hamilton's results are based on an age- In Equation 17, ⊗ is the Kronecker product, I n is the n × n identity matrix, K is the s × s vec-permutation matrix-see box 2 of Caswell et al. (2018) for more details on this matrix-, U is a block diagonal matrix where each block is a × matrix with 1s in the whole subdiagonal and in the ( , )-entry and zeros everywhere else, F is a block diagonal matrix where each block is a × matrix with 1s in the first row and zeros everywhere else, E jj is a matrix with a 1 in the (j, j)-entry and zeros everywhere else, the vec( • ) operator applies to a matrix and returns the columns of this stacked one on top of the other, G is the matrix U after normalizing each column so that its components add up to 1, e s is a s × 1 vector of 1s,  is the operator that from a vector argument returns a diagonal matrix, is the vector of column sums of Similarly, recall that the selection force on fecundity m j at age j is the sensitivity m j of ln to an additive increase of the same magnitude in the fecundities of all individuals aged j independently of their stage.
Thus, we set a perturbed matrix as A j = U j + F j + j sgn F j , where F j is the fecundity matrix for age class j, which is identical to the overall fecundity matrix F in the absence of perturbations ( j = 0), while sgn F j is the matrix obtained by applying the signum function to F j entry-wise, which returns a matrix with 1 in the (i, j)-entry whenever the corresponding entry of F j is positive and zeros everywhere else (Section A.8 notes that alternative perturbation patterns are possible).
From Equation 11, we then get Using Equations 18 and 19, we were able to derive analytic results that the present authors were not able to derive directly from Equation 17.
To start putting our expressions at work, we employed Equation 16 and noted that death eventually completely erodes any newborn cohort. Therefore, w j tends to the zero vector as j → ∞, see Section A.5 in the Appendix for a proof. Hence, the asymptotic behavior of m j does not rule out that, differently from Hamilton's original finding, selection on fecundity can increase over some ages before eventually waning (more on this below).
After having revisited some results of Hamilton (1966) for the stage-classified case, we use Equations 18 and 19 to better understand age-specific selection within stages. Since j and m j have limit zero as j → ∞, j,k and m j,k must have the same asymptotic behavior. Evolutionarily, this means that selection within each stage has an overall pro-senescent pattern at late ages. As for contra-senescent selection, Section A.9 of the Appendix shows that where b k and c k are positive constants that depend on stage and not on age, whereas w k,j is the stable population fraction of age j and in stage k. Hence, within a stage, the age-trajectory of selection against mortality and the age-trajectory of selection on fecundity are both proportional to the stable age distribution within that stage.
At demographic stability, the overall age distribution monotonically decreases with age when the population is not going extinct because death progressively erodes any newborn cohort. The stable age distribution within a stage, instead, is not always monotonic, depends on details of the species life cycle and the shape of this distribution is not always obviously guessed (Boucher, 1997). However, some qualitative insights can be gained by reasoning upon the specific matrix model of one's interest. Take, for example, Dipsacus sylvestris, the wild teasel, as modeled by Caswell (2001, p. 60). Its life cycle is in Figure 1. It takes a minimum of two demographic projections to go from offspring stages, that is, stages where new recruits are found at their first census, to the unique reproductive stage (flowering plants). The reproductive stage is accessible from multiple stages where stasis, that is, permanence in the same stage upon projection, is possible. In turn, these stages can be accessed via multiple pathways. Hence, the age distribution within the reproductive stage should start increasing only at age 2 being progressively fueled by the arrival to that stage of individuals becoming reproductive at different ages. By proportionality between age distribution within a stage and selection on age-specific fecundity within that stage, we expect selection on fecundity in Dipsacus to be initially contrasenescent ( Figure 1). Since there is a single reproductive stage, this also shows that stage-independent selection on fecundity in this species can increase with adult age, in contrast to Hamilton's original finding.
Another key insight of Equation 22 is that, within a reproductive stage, selection against mortality and selection on fecundity are proportional to one another. In fact, Equation 22 immediately leads to where b k ∕ c k is a quantity that depends on stage (k), yet not on age ( j ).
This means that, within a stage, the magnitude of the ratio of selection against age-specific mortality to selection on age-specific fecundity remains constant independently of age. An illustration of this fact is in Figure 2, where we quantified selection within female stages of Arisaema serratum (Thunb.) Schott (Araceae), a perennial herb, as modeled by Kinoshita (1987). We also quantified selection with the method of Caswell (2012), which Caswell and Salguero-Gómez (2013, Eqs. 30-1) applied to the same dataset. The exact match with our results serves as a validation of our method. It should be noted that, through Equation 17 by Caswell and Salguero-Gómez (2013), one can also plot the ratio of these two selective forces (Caswell, personal communication). However, as with the other results above, we were not able to prove as directly from Equation 17 the age independence of this ratio.
It should also be remarked that our findings about age-specific selective forces apply to the case of models only classified by stage.
To derive these results, we have leveraged the fact that the same transition matrix and the same fecundity matrix apply to each age class in these models. In age × stage matrix models, which we do not study here, the transition matrix and the fecundity matrix typically differ between age classes so that our results do not obviously generalize to these models.

| APPLI C ATI ON 2-AG E-S PECIFI C EL A S TI CITIE S
Elasticities are proportional sensitivities (Caswell, 2001). They are much used quantities in ecological analysis, for example (Coutts et al., 2016;Csergő et al., 2017;Kayal et al., 2018;Koons et al., 2016;Struckman et al., 2019;Tredennick et al., 2018  By a similar reasoning as before applied to Equation 6, the ageindependent elasticity of the stochastic growth rate to a subset of the entries of the matrix model is It has proven important for some analyses to decompose this stochastic elasticity in different ways. Tuljapurkar et al. (2003) and Haridas and Tuljapurkar (2005) distinguished the elasticity of s to the averages of the relevant entries of the matrix model from the elasticity of s to the standard deviations of these entries where A 0 is the long-run average of A 0 (t). Note that Tuljapurkar et al. (2003). Hence, the elasticity in Equation 26 can be seen as an elasticity to both the average and the standard deviation of the entries of interest.
The other decomposition of Equation 26 that we will consider here is into environment-specific elasticities. Let be a subset of the environmental states and let 1 (t) be an indicator function that takes value 1 at t when the environment is in a state in and value 0 otherwise. The elasticity , F I G U R E 2 Age-specific selective forces within females stages of Arisaema serratum. These forces are computed using the method proposed here (circles) and a previous method (diagonal crosses) by Caswell (2012) that Caswell and Salguero-Gómez (2013, their fig. 3) employed to compute the same quantities. The methods are in perfect agreement. The distinctive analytical power of the proposed method, however, allows us to make a step further and predict (horizontal lines) from Equation 22 the existence of (and not only the theoretical possibility of visualizing) an age-independent ratio between the force of selection against mortality and the force of selection on fecundity at each age within a single stage. The Supporting Information (Giaimo & Traulsen, 2022a) contains code to generate this figure. is the sensitivity of ln s to a proportional perturbation of the entries of our interest in the matrix model only when the environment is in a state in (Åberg et al., 2009;Caswell, 2005;Horvitz et al., 2005).

When all environmental states are in , the elasticity in Equation 29
is equal to the environment-independent elasticity in Equation 26.
When contains a single environmental state, we refer to the resulting elasticity as the elasticity of s to that environment. However, note that this name should not suggest in any way a change in the transition probabilities of the (assumed constant) environmental Markov chain. For perturbations of this chain, see Steinsaltz et al. (2011).
Making elasticities of the stochastic growth rate age-dependent is just as easy as it was for the stable growth rate. Using Equation 12, all it takes is to replace w(t) in the numerator of Equations 26-29 with w j (t), These elasticities have the same meaning as their age-independent counterparts except that they refer to perturbations that only affect individuals of age j.
Finally, we consider elasticities of transient growth. From Equations 7 and 8, the elasticity of t to a subset of the entries of A is From Equations 13 and 14, the age-specific version of this quantity simply is Since the sum of w j (t) over all ages j is w(t), all age-specific elasticities we have considered above decompose the corresponding ageindependent elasticities F I G U R E 3 Age-specific elasticities of stochastic growth s . We initiated a population with random stage distribution. We demographically updated the populations for 70,000 time-steps using a randomly generated sequence of projection matrices. We computed elasticities of s to different demographic processes: fecundity (F), individual growth (G), retrogression (R), and stasis (St). Age-specific elasticities were computed for each case using Equation 30. Only age-specific elasticities up to age 7 are reported here, as elasticities for later ages contributed only minimally to the overall age-independent elasticity for this dataset. In computing elasticities, we removed the first and last 10,000 steps to minimize transient effects. The analysis is based on demographic data for population E of kidney vetch in Davison et al. (2010). The Supporting Information (Giaimo & Traulsen, 2022a) contains code to generate this figure.
Assuming, as it seems reasonable, that even under fluctuating environment, death stills erodes to the end any initial newborn cohort so that w j (t) → 0 as j → ∞, then Equations 30 and 32 imply that j → 0 as j → ∞. Hence, we can approximate an age-independent elasticity by adding a sufficient number of its age-specific components j .
To put age-specific stochastic elasticities at work, we took demographic data about one of the populations of Anthyllis vulneraria, the common kidney vetch, analyzed by Davison et al. (2010). In their model, there are three projection matrices corresponding to three environmental states assumed independent and identically distributed. Four stages were distinguished: seedling, vegetative adult, small flowering adult, and large flowering adult. Projection matrices were of the form Entries in this matrix are grouped on the basis of the general demographic process they contribute to: fecundity (F), individual growth (G), retrogression (R), and stasis (St). To obtain the elasticity of s to one of these processes, we set A 0 (t) by zeroing the entries in Equation 34 that do not pertain to this process. Figure 3 reports stochastic elasticities to each demographic process. Elasticities are represented as sums of age-specific components. Figure 3 makes visible how, overall, individual growth at age 1 is the age-specific demographic process to which s is the most elastic.
Using the same dataset, we computed age-specific elasticities of transient growth to each general demographic process (Figure 4).
Age-independent elasticities of transient growth can take different signs at different time points (see elasticity to stasis, Figure 4). Our analysis shows that the elasticity of transient growth at a single time point can have age-specific components of different signs. For example, looking at time t = 14 in Figure 4, the elasticity to fecundity at age 2 is positive, while the elasticity to fecundity at age 3 is negative. (34)

F I G U R E 4
Age-specific elasticities of transient growth t . We initiated a population with uniform stage distribution and random age distribution with maximum initial age of 30. We demographically updated the populations for 30 time-steps using a randomly generated sequence of projection matrices. We computed elasticities of t to different demographic processes: fecundity (F), individual growth (G), retrogression (R), and stasis (St). Age-specific elasticities were computed for each case using Equation 32 with initial vectors n(0) ∕ set equal to the zero vector. Only age-specific elasticities up to age 7 are reported here, as elasticities for later ages contributed only minimally to the overall age-independent elasticity for t ≥ 6 in these simulations. Note that elasticities are on different scales. The analysis is based on demographic data for population E of kidney vetch in Davison et al. (2010). The Supporting Information (Giaimo & Traulsen, 2022a) contains code to generate this figure.

| SUMMARY
The growth rate of a population is a quantity of primary interest in ecology and evolution. A well-established machinery rooted in matrix models exists to compute the sensitivity of population growth to any underlying demographic variable (Caswell, 2001(Caswell, , 2005(Caswell, , 2007(Caswell, , 2019Caswell et al., 2018;Horvitz et al., 2005;Tuljapurkar et al., 2003). Here, we have proposed a method that, by only minimally modifying some results of such machinery, can make sensitivity analysis age-specific. The modification essentially consists in replacing the overall stage distribution that appears in sensitivity formulas for stage-classified populations with the age-specific stage distribution. The latter is easily computed by distinguishing transition/survival events from reproductive events in the matrix model.
The method may be useful to those who are interested in analyzing along the "age" dimension the already existing matrix models that are classified solely by stage.
The proposed method applies to stable population growth, the stochastic growth rate and transient growth. In the age-specific sensitivity analysis of stable growth for populations solely classified by stage, our method offers a possible alternative to the established method that requires for this analysis the separate construction of an age × stage matrix model (Caswell, 2012;Caswell et al., 2018).
This latter method led to observe contra-and pro-senescent selection within life stages (Caswell & Salguero-Gómez, 2013). We regard as an advantage of our method its ability to explain these observations by proving the existence of a proportionality between age-specific selective forces within a stage and the age distribution within that stage. In the case of stochastic population growth, to our knowledge there is no other method that has been applied explicitly yet for the age-specific sensitivity analysis of matrix models only classified by stage.
More generally, our method contributes to studies in ecology and evolution by decomposing usual quantities in the sensitivity analysis of population growth, like elasticities, into their age-specific components. Thus, the proposed method makes sensitivity analysis more fine-grained.

ACK N OWLED G EM ENTS
The authors are grateful to Hal Caswell and two anonymous reviewers for their helpful comments on this manuscript. The authors also acknowledge funding from the Max Planck Society. Open Access funding enabled and organized by Projekt DEAL.

CO N FLI C T O F I NTE R E S T
The authors have no conflicts of interest to declare.

O PE N R E S E A RCH BA D G E S
This article has earned Open Data and Open Materials badges. Data and materials are available at https://doi.org/10.5061/dryad.6m905 qg3m.

DATA AVA I L A B I L I T Y S TAT E M E N T
Code and data that support the findings of this study are openly

A .1 | D E R I VATI O N O F EQ UAT I O N 11
We start from the eigenvector equation that relates the stable stage distribution w (with components that add up to 1), the stable growth rate and the projection matrix A of the population: We rewrite the right hand side of Equation A1 as a series where the component i of w k is the stable population fraction that is both in stage i and of age k. Age 1 is assigned to new recruits at their first census. Age is updated at demographic projection so that an individual of age j at t is of age j + 1 at t + 1. Thus, w can be thought of as the row sums of an array with as many rows as stages and an infinite number of columns each representing one age. The sum over all entries of the array is 1. The age index in Equation A2 runs to infinity. To set a maximum age , it is sufficient to let all vectors w j with j > be equal to the zero vector. In Equation A2, A k = A for all k = 1, 2, … so that A k w k demographically projects individuals aged k over one time step.
In this scheme, individuals of each age are all subject to the same demographic rates. But suppose there is a parameter x j on which the demographic rates of individuals of age j in the population depend.
The parameter currently takes value x * j . Since the demography of the population depends on x j , both the stable stage distribution w and the stable growth rate are functions of this parameter. As for demographic projection, only A j is a function of x j , while all other matrices A k with k ≠ j in Equation A2 are not, as these matrices contain the demographic rates to project individuals of age different from j . However, note that there presently is no difference between these projection matrices so that A j x * j = A k with k ≠ j. To express the dependencies of , w, and A j from x j we can rewrite Equation A1 using Equation A2 Note that, when x j = x * j , the right hand side of Equation A3 converges to Aw. We assume that ∑ ∞ k=1 w j ∕ x j uniformly converges on some interval containing x * j . Let us differentiate Equation A3 with respect to x j

A . 2 | EQ U I VA LE N CE WITH C A S WE LL (2 012)
Here, we show that the approach of Caswell (2012) to the agespecific sensitivity analysis of stable population growth for stageclassified models and our approach are essentially equivalent. Given a q × q, time-independent stage-classified model A, Caswell (2012) suggests to decompose it into a transition matrix U = u i,j and a fecundity matrix F = f i,j , where u i,j is the probability that an individual in stage j at t is alive and observed in stage i at t + 1 and f i,j is the number of new recruits in the population observed in stage i at t + 1 per individual in stage j at t, so that A = U + F. Then, fixing a maximum number of age classes, one defines the age-specific ma- defined as in Section 2.2 of the main text. Using these matrices and a construction approach of extremely high generality, Caswell (2012) builds the age × stage matrix Ã in blocks. It would seem that Caswell's construction leads to: This matrix updates a population state vector ñ(t) of the form where ñ k (t) = ñ 1,k (t),ñ 2,k (t), … ,ñ q,k (t) ⊤ with k = 1, 2, … , − 1 is the vector containing the population abundance ñ i,k (t) in stage i and of age k at t, while the vector ñ ≥ (t) = ñ 1,≥ (t),ñ 2,≥ (t), … ,ñ q,≥ (t) ⊤ contains the population abundance ñ i,≥ (t) in stage i and of age at least at t. Note, in particular, that the shape of Ã implies that new recruits at t are all in ñ 1 (t) and that individuals in ñ k (t) who survive (and possibly transition of stage) over one time step are all in ñ k+1 (t + 1) for k = 1, 2, … , − 2, those who are in ñ −1 (t) and survive over one time step are all in ñ ≥ (t + 1) with the remaining part of those in ñ ≥ (t + 1) being composed of those who are in ñ ≥ (t) and survive over one time step. This explains the sense in which the matrices U i and F i are agespecific. Caswell (2012) then proposes to get age-specific sensitivity information about the initial, stage-classified matrix A by performing the analysis on the age × stage matrix Ã instead. The assumption is that A and Ã have the same dominant eigenvalue. As Caswell (2012, p. 409) says, since "the vital rates do not depend on age, the dominant eigenvalues of A and Ã should be identical." Caswell (2012, p. 413) also notes that, in general, Ã may be reducible. "This means that one must ascertain that the eigenvalues and eigenvectors [of the age × stage model] under analysis correspond to initial conditions of interest" (Caswell, 2012, p. 413), because asymptotic dynamics may depend on initial conditions. However, Caswell (2012, pp. 413, 415-6) shows that it is both necessary and sufficient that the left eigenvector corresponding to the dominant eigenvalue of Ã is positive component-wise for population growth to be described by this eigenvalue regardless of initial conditions. Caswell (2012) appears to suggest that one should numerically check for the specific matrix model of one's interest whether the condition of positivity for the left dominant eigenvector of Ã is satisfied.
Before showing equivalence with our approach, we first expand on Caswell's approach. We assume that A is irreducible. By irreducibility and nonnegativity, the matrix A has a dominant eigenvalue , which is real, positive, with geometric multiplicity of 1 and greater in magnitude than all other eigenvalues of A (Horn & Johnson, 2013, Theorem. 8.4.4 where w is the dominant right eigenvector of A, that is, the stable stage distribution, A = U + F and w j is the fraction of the stable stage distribution aged j so that We can now directly address the equivalence problem. Let us denote with w and ṽ, respectively, the right and left eigenvectors of Ã and note that, using the above results about these eigenvectors, Suppose now that we are interested in the age-specific sensitivity of the natural logarithm of the eigenvalue of Ã . Since the blocks U j and F j for j < contain the demographic rates specific to individuals of age j, we rewrite the matrix Ã as to highlight that only demographic parameters for individuals of age j depend on j . Using (while somewhat abusing notation) the general result of Caswell (1978) in Equation 2 of the main text, Equation A16 and the results above about w and ṽ, we have which coincides with Equation A11 in the main text. This proves the equivalence of the two approaches.

A . 3 | D E R I VATI O N O F EQ UAT I O N 12
Here, we derive Equation 12 in the main text by adapting the original derivation by Tuljapurkar (1990), with later extension by Caswell (2005), of Equation 6 in the main text. A derivation of Equation 6 that is more rigorous, yet more complex, than that in Tuljapurkar (1990) concerning limit interchanges is in Steinsaltz et al. (2011). For simplicity, we here adapt the original derivation of Tuljapurkar (1990) as presented in Caswell (2001, sec. 14.4.1) to obtain Equation 12.
We introduce four quantities. First, the time-specific stage distribution where e is a vector of 1s. Second, the time-specific growth Third, the time-specific reproductive value vector Fourth, the time-specific backward growth of reproductive value Then, we recall from Tuljapurkar (1990, Eq. 11.2.3) that the stochastic growth rate in Equation 4 in the main text can be expressed as where w(0) and v(L), that is, the initial stage distribution and the final reproductive value vector, are two independent vectors each having arbitrary nonnegative components that add up to 1. We let be the quantity within brackets in Equation A23.
Initially, we consider an age-independent perturbation.
Repeatedly using Equations A19-A22, we write L by making explicit the contribution of projection of the population stage distribution at time t toward the computation of the stochastic growth rate We first consider the effect of a time-specific, age-independent change in L . In particular, we assume that the projection matrix A(t) containing demographic rates at time t depends on some parameter x t with current value x * t so that we write this matrix as A(t) = A x * t , t . Note that x t also is a function of x t . Using Equation A25, the sensitivity of L to x t at x * t is Suppose now that the change is no longer time specific and all matrices in L may depend on the parameter x. The sensitivity of L to x at x * is the sum of time-specific sensitivities each having the same form as Equation A26 . Thus, Using Equations A19-A25 and A27, the sensitivity of ln s to x at x * then is where we have assumed the validity of interchange of limits, that is, the time limit and the derivative with respect to x. Equation A28, (A20) t = e ⊤ A(t)w(t).
which is due to a variation of Caswell (2005) on the original result of Tuljapurkar (1990), corresponds to Equation 6 in the main text.
We now consider age-and time-specific changes in demographic parameters. We use the fact that Equation A25 singles out the role of demographic projection at time t in the computation of ln s to proceed similarly to Section A.1 and write where M is the maximum age in the initial population, that is, at t = 0 , and A k (t) = A(t), while the vector w k (t) is the fraction of the stage distribution of age k at t so that Equation A29 makes conspicuous the demographic projection of each age class in the population at t. Similarly to the previous section and above, we model time-and age-specific dependency of demographic rates by assuming that the matrix A j (t) depends on some parameter x j,t Proceeding as in Equations A27 and A28 to remove time specificity and look at the sensitivity of ln s to x j at x * j , we find that which corresponds to Equation 12 in the main text.

A .4 | D E R I VATI O N O F EQUATI O N S 13 A N D 14
As in the previous sections, let x j be a parameter with current value x * j upon which the demographic rates of individuals aged j depend. We with k ≠ j which corresponds to Equation 14 in the main text.

A . 5 | CO H O RT E ROS I O N BY D E ATH
Under standard assumptions in demography about A, we have that is the Perron root of this matrix and the corresponding eigenvectors v and w are entrywise positive. Hence, from Equation 2, ln ∕ a i,j = v i w j ∕ v ⊤ w > 0 so that is an increasing function of the entries of A. Hence, we have that −1 U < −1 A = 1, where is the spectral radius because U ≤ A entrywise with at least some strict inequality. Therefore, −1 U converges to the zero matrix. From Equation 16, w j+1 = −1 U j w 1 with j ≥ 1 tends to the zero vector as j goes to infinity. We refer to this as the fact that death eventually completely erodes any newborn cohort.

A . 6 | D E R I VATI O N O F EQ UAT I O N 21
Using Let be the first age at which reproduction is possible. This is the shortest path length from any offspring stage to any reproductive stage in the graph of the transition matrix U (Cochran & Ellner, 1992).
Offspring stages are those corresponding to the nonzero rows of the fecundity matrix F, while reproductive stages are those corresponding to the nonzero columns of F. All components of w j corresponding to reproductive stages are equal to zero for 1 ≤ j < . Some of the components of w j corresponding to reproductive stages are greater than zero for j ≥ . Then, we have that −1 v ⊤ Fw j = 0 for j < and −1 v ⊤ Fw j > 0 for j ≥ . As a consequence, we can establish the following inequalities between the left-most side of Equation A39 and the first term in the right-most side of this equation Dividing through the second line of Equation A40 by v ⊤ w and using Equation A37, we obtain Equation 21 in the main text.

A .7 | M O R E TH A N O N E AG E-S PECI FI C PA R A M E TE R
In the main text, we have explored the sensitivity of population growth to a single age-specific parameter. Here, we give formulas for the sensitivity of population growth to multiple age-specific parameters. Suppose that demographic rates for individuals aged j are a function of a vector of p age-specific parameters. We want to obtain the sensitivity of (the natural logarithm of) stable population growth , which is the dominant eigenvalue of the m × m stage-classified projection matrix A, to this vector. We recall that A j is the projection matrix for individuals of age j. We adopt the formalism of matrix calculus introduced to ecology by Caswell (2007Caswell ( , 2009, see there for more details. In this formalism, the vec( • ) operator takes a matrix as argument and returns a column vector containing the matrix columns stacked one above the other, the vec ⊤ ( • ) operator takes a matrix as argument and returns the transpose of a column vector containing the matrix columns stacked one above the other and ⊗ is the Kronecker product. Adapting this formalism to our case, the generalization of Equation 11 in the main text to multiple age-specific parameters is where d ∕ d ⊤ (j) is a 1 × p vector with component i equal to the partial derivative of with respect to component i of (j), dln ∕ dvec ⊤ A j is a 1 × m 2 vector with ∕ (A) k,l as component k + (l − 1)m, while w j , w and v are, as in the main text, the stable fraction of the stage distribution aged j (see Equation 16 in the main text), the stable stage distribution (right dominant eigenvector), and the reproductive value vector (left dominant eigenvector) of A, respectively. The partial derivative of the (k, l)-entry of A j with respect to component s of (j) is found as the (k + ml − m, s) entry of the m 2 × p matrix dvec A j ∕ d ⊤ (j).
Similarly, Equation 12 in the main text generalizes to while Equations 13 and 14 in the main text generalize to where n(t) ∕ ⊤ (j) in Equation A44 is a m × p matrix with (k, l)-entry equal to n k (t) ∕ l (j), which is computed via the recursion with I m the m × m identity matrix.

A . 8 | PE RTU R BATI O N PAT TE R N O F FECU N D ITI E S
We could substitute sgn(F) with another matrix with a different pattern of 0s and 1s, that is, representing a different way of additively perturbing fecundity, and still obtain a null sequence. These alternative perturbation patterns correspond to what is deemed biologically realistic in a specific context. For example, one can also consider the possibility of additively incrementing all entries in those rows of F j that contain at least one positive entry. Different nonzero rows of F j identify different offspring stages, where offspring can differ, for example, in their size at birth, that are born to parents aged j. Altering all entries in one of these rows for sensitivity analysis means including in the analysis the effect of altering the fecundity of all stages. But there may be stages that, for biological reasons, cannot be reproductive, for example, a stage comprising individuals of too small size. Moreover, not all reproductive stages may be able to produce all types of offspring, for example, a reproductive stage with small-sized individuals may not produce largesized offspring. For these reasons, we prefer to only look at the effect of additive increments in already existing fecundities.

A .9 | D E R I VATI O N O F EQ UAT I O N 22
First, we derive the sensitivity k,j of ln to a proportional change of the same magnitude exclusively in the entries of U j = U that are in column k. By a reasoning analogous to that brought us to Equation 18 in the main text where E k,k is a matrix of the same dimensions as U and with (k, k) entry equal to 1 and 0 everywhere else. Then, we derive the sensitivity m j,k of ln to an additive change of the same magnitude exclusively in the positive entries of F j that are in column k assuming that this column is not zero. Adapting the reasoning that led us to Equation 19 in the main text,